<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //map数据结构，键的范围不限于字符串，实现了iterator接口
        let m = new Map()
        console.log(m)
        // 添加 键值对
        m.set('name','王大拿')
        console.log(m)
        let key = {name:'sam'}
        m.set(key,['beijing','shanghai'])
        console.log(m)
        //个数 size
        console.log(m.size)
        //删除 m.delete
        //获取
        console.log(m.get('name'))
        //map 升级版的对象
    </script>
</body>
</html>